import { hasPermission } from "@/utils";
export default {
  beforeRouteEnter(to, from, next) {
    let isPermission = hasPermission([to.meta.permission]);
    if (isPermission) {
      next();
    } else {
      next({
        name: "forbidden"
      });
    }
  }
};